import request from '@/utils/request'
import {list} from "../monitor/operlog";

const PATH = '/crm/businessTrack';

// 查询线索追踪列表
export function listBusinessTrack(query) {
  query.pageNum = 1;
  query.pageSize = 5;
  return list(query);
}

// 新增线索跟踪记录
export function addBusinessTrack(data) {
  return request({
    url: PATH,
    method: 'POST',
    data: data
  })
}

// 踢回公海
export function giveBackBusiness(id, data) {
  return request({
    url: `${PATH}/giveBack/${id}`,
    method: 'PUT',
    data: data
  })
}

// 捞取
export function resetBusiness(id, data) {
  return request({
    url: `${PATH}/reset/${id}`,
    method: 'PUT',
    data: data
  })
}

// 转客户
export function transform(id, data) {
  return request({
    url: `${PATH}/transform/${id}`,
    method: 'PUT',
    data: data
  })
}
